import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'Home',
        component: () =>
            import ('../views/Home.vue'),
    },
    {
        path: '/visitadd',
        component: () =>
            import ('../views/visit/VisitAdd.vue')
    },
    {
        path: '/visitrecord',
        component: () =>
            import ('../views/visit/VisitRecord.vue')
    },
    {
        path: '/visitdetails/:id?',
        component: () =>
            import ('../views/visit/VisitDetails.vue')
    },
    {
        path: '/visitlist',
        component: () =>
            import ('../views/visit/VisitList.vue')
    },
    {
        path: '/visitquery',
        component: () =>
            import ('../views/visit/VisitQuery.vue')
    }, {
        path: '/user',
        name: 'User',
        component: () =>
            import ('../views/Client/User.vue'),
    },
    {
        path: '/compile/:id?',
        name: 'Compile',
        component: () =>
            import ('../views/Client/Compile.vue'),
    },
    {
        path: '/searshlist',
        name: 'SearshList',
        component: () =>
            import ('../views/Client/SearchList.vue'),
    },
    {
        path: '/clientadd/:id?',
        name: 'ClientAdd',
        component: () =>
            import ('../views/Client/ClientAdd.vue'),
    },
]
const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})
export default router